package com.liuyanban.service.impl.user;

import java.util.Collection;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.liuyanban.dao.base.BaseDao;
import com.liuyanban.dao.user.RoleDao;
import com.liuyanban.domain.user.Role;
import com.liuyanban.service.impl.base.BaseServiceImpl;
import com.liuyanban.service.user.RoleService;

@Service("roleService")
public class RoleServiceImpl extends BaseServiceImpl<Role> implements
		RoleService {
	@Resource(name = "roleDao")
	private RoleDao roleDao;

	@Override
	public BaseDao getBaseDao() {
		return this.roleDao;
	}

	@Override
	public Role getRoleByName(String name) {
		return this.roleDao.getRoleByName(name);
	}

	@Override
	public Collection<Role> getRoleByUid(Long userid) {
		return this.roleDao.getRoleByUid(userid);
	}

}
